#ifndef __XFTP_SERVER_CMD_HPP__
#define __XFTP_SERVER_CMD_HPP__
#include "thread_task.hpp"
#include "xftp_task.hpp"

#include <map>
class xftp_server_cmd : public xftp_task 
{
private:
    /* data */
public:
    virtual bool Init()override;
    xftp_server_cmd(/* args */);
    ~xftp_server_cmd();
    virtual void read_cb(struct bufferevent *buffer) override;
    virtual void event_cb(struct bufferevent *buffer,short what) override;
    
    // 注册命令处理对象无需考虑线程安全
    void registration_command(std::string,xftp_task* call_task);
private:
    std::map<std::string,xftp_task*> m_call_task;
};


#endif